package cn.kbyue.preview.util;

import java.util.Arrays;
import java.util.List;

/**
 * @author XL
 * @version 0.1
 * @date 2021/1/31 16:11
 */
public class EnvUtils {

    public boolean isTest(String profile) {
        List<String> devEnv = Arrays.asList("dev", "test");
        return devEnv.contains(profile);
    }

    public String currentEnv(String profile) {
        if ("dev".equals(profile)) {
            return "ENV_DEV";
        } else if ("test".equals(profile)) {
            return "ENV_TEST";
        }
        return "UNKONWN";
    }

}
